<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas" width="500" height="500"></canvas>
</body>
</html>
<script>
    var canvas = document.getElementById('canvas')
    var ctx = canvas.getContext('2d')

    ctx.fillStyle = '#eee'
    ctx.rect(50,50, 100,100)
    ctx.fill()

    ctx.strokeStyle = 'red'
    ctx.lineWidth = 20
    ctx.stroke()
</script>